package simple;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Palindrome {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String temp;
		try {
			temp = br.readLine();
			System.out.println(temp);
			StringBuilder temp1 = new StringBuilder();
			for(int i = temp.length()-1;i>=0;i--){
				temp1.append(temp.charAt(i));
			}
			System.out.println("reversed   "+temp1);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
